package com.easyOrder.service.enums;

/**
 * Created by liutao on 2017/7/17.
 */

public enum RongCloudMessageTypes {

    text("RC:TxtMsg", "文本消息"),
    ;

    private String value;

    private String desc;

    private RongCloudMessageTypes(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static RongCloudMessageTypes parse(String value) {
        if (null == value) {
            return null;
        }
        RongCloudMessageTypes[] coll = values();
        for (RongCloudMessageTypes item : coll) {
            if (item.getValue().equals(value)) {
                return item;
            }
        }
        return null;
    }
}

